export class Storeage {
  static defaultKey = 'jiangqi.'
  static setItem(key: string, value: any) {
    localStorage.setItem(`${this.defaultKey}${key}`, JSON.stringify(value))
  }
  static getItem(key: string) {
    const value = localStorage.getItem(`${this.defaultKey}${key}`) || null
    if (value) {
      return JSON.parse(value)
    }
  }
  static remove(key: string) {
    localStorage.removeItem(`${this.defaultKey}${key}`)
  }
  static clear() {
    localStorage.clear()
  }
}